Computer networking allows a computer to perform functions that require interaction with other computers. Through these interactions, a computer can obtain information of various types. Network connections support functions such as sending e-mails, downloading audiovisual content from the Internet or accessing electronic files stored on a server that is accessible by many co-workers.
Wireless networks can be particularly powerful, allowing network functions to be performed by computers that are highly portable. Though, wireless networks pose a problem that does not exist when a computer is connected to a wired network by attaching a wire to the computer. For a computer to connect wireless to a network, the computer must determine that there is another wireless device in its vicinity with which it can form a network or through which it can connect to a network.
Some networks operate in an infrastructure mode. In infrastructure mode, a wireless device acts as an access point to the network. A wireless device that is already configured with information about the access point can connect to the access point. Once connected, the access point recognizes, and appropriately routes, packets sent by the wireless device. If the wireless device is not already configured for communication with the access point, it may be necessary for the wireless device to “discover” the access point.
In general, wireless protocols provide for “discovery”. Discovery involves, in some form, communications between a wireless device seeking to discover one or more other wireless devices and the wireless device being discovered.
Infrastructure mode protocols can be designed with the assumption that the access point will be specifically configured for its role as an access point. Accordingly, the access point may be more active in implementing the communications that allow discovery. In accordance with some protocols, the access point may periodically transmit beacons on one or more channels used by the access point. Devices seeking to discover a network access point can perform a “scan.” The scan may be passive in that the device seeking to discover an access point does not transmit. Rather, it successively “listens” on each of the channels on which a beacon could be transmitted in an attempt to receive a beacon.
A passive scan may involve a wireless device that is seeking to discover an access point listening on each channel for an interval that is long enough that, if an access point is transmitting beacons on that channel, a beacon would be detected. For example, if a protocol specifies that an access point is to transmit a beacon every 100 msec, the wireless device performing a passive scan may listen on each channel that could be in use by an access point for at least 100 msec.
Some protocols also support an active scan. In an active scan, a device seeking an access point may transmit a message, sometimes called a “probe request,” on channels that may be in use by an access point. If an access point is using a channel on which a probe request is transmitted, the access point will respond to the probe request. A device actively scanning for an access point may more quickly determine if an access point is using a specific channel. For example, some protocols may specify that a device transmitting a probe request should receive a response to the probe within 20 msec if there is an access point on the channel on which the probe request was transmitted. Accordingly, the device needs only to listen for 20 msec on a channel before concluding that there is no access point on the channel. However, active scanning requires transmissions on any channel on which a device is to be discovered and, by regulation, transmissions for scanning may be prohibited on some channels.
Networks operating in an ad hoc mode similarly employ discovery that involves transmitting and listening. However, in ad hoc mode, there may be no fixed access point. Instead, devices that have discovered each other may pair, and as part of forming an ad hoc connection, determine that one of the devices will play a role similar to an access point in controlling the connection. In the Wi-Fi Direct protocol, this device is termed the Group Owner and is selected as part of group owner negotiation, which does not occur until after discovery.
During discovery phase, each device may perform a sequence of actions that can involve both intervals during which the device sends messages and intervals during which the device listens for other devices sending message. Two devices discover each other when one is transmitting a discovery message on the same channel on which the other is simultaneously listening for a discovery message.
In accordance with the Wi-Fi Direct protocol, discovery may include a “scan” phase and a “find” phase. During the scan phase, a device may perform an active or a passive scan, in much the same what that a device would perform a scan in seeking to connect to an infrastructure network. Though, because there is no guarantee that a device, though available for discovery, will be transmitting discovery messages (e.g., beacon frames) while another is listening for discovery message. As a result, a scan, particularly a passive scan, may not discover an available device.
A device performing discovery under Wi-Fi Direct may enter the “find” phase to find devices not found during the scan phase. During the find phase, a device uses only channels that are designated as “social channels.” During the find phase, a device alternates between search and listen operations. During search, a device may transmit a discovery message on a social channel and waits for responses, it may then move on to the next social channel and repeat the process. During listen, the device listens for a discovery message on a “social channel” for an amount of time randomly selected to be between approximately 100 to 300 msec.